package com.vrp3d.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vrp3d.domain.dto.showroom.ShowroomListDTO;
import com.vrp3d.domain.dto.showroom.ShowroomSearchDTO;
import com.vrp3d.domain.po.Showroom;
import com.vrp3d.domain.po.ShowroomExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 展厅
 *
 * @author vrp3d
 */
@Repository
public interface ShowroomMapper {
    int countByExample(ShowroomExample example);

    int deleteByExample(ShowroomExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Showroom record);

    int insertSelective(Showroom record);

    List<Showroom> selectByExample(ShowroomExample example);

    Showroom selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Showroom record, @Param("example") ShowroomExample example);

    int updateByExample(@Param("record") Showroom record, @Param("example") ShowroomExample example);

    int updateByPrimaryKeySelective(Showroom record);

    int updateByPrimaryKey(Showroom record);

    /**
     * 展厅列表
     *
     * @param page
     * @param search
     * @return
     */
    List<ShowroomListDTO> getShowroomList(Page<ShowroomListDTO> page, @Param("search") ShowroomSearchDTO search);
}